﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class FootCol : MonoBehaviour {

    public GameObject playerGobj;
    private PlayerCtrl pc;

    void Awake()
    {
        pc = playerGobj.GetComponent<PlayerCtrl>();
    }

    void OnCollisionEnter2D(Collision2D coll)
    {
        if (coll.gameObject.tag == "Wood")
        {
            pc.grounded = true;
        }
    }

    void OnCollisionExit2D(Collision2D coll)
    {
        if (coll.gameObject.tag == "Wood")
        {
            pc.grounded = false;
        }
    }
}
